<template>
  <div>
    <p><input type="text" v-model="xing"></p>
    <p><input type="text" v-model="ming"></p>
    <p><input type="text" v-model="full"></p>
  </div>
</template>

<script>
export default {
    data(){
        return{
            xing:'',
            ming:'',
            message: {
                id: "",
                email: "",
                name: "",
                content: "",
                gender: 0,
            }
        }
    },
    computed:{
        full:{
            get(){
                return this.xing+'-'+this.ming
            },
            set(value){
               let [first,last] = value.split('-')
               this.xing = first;
               this.ming  = last;
            }
        }
    }
}
</script>